package com.tao.entity;


import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import org.apache.ibatis.annotations.Select;

import java.util.Date;

/**
 *
 * @author 徐书涵
 * @date 2023/5/5
 * @content :求助（help）对象
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("help")
public class Help {
//    求助id
    private Long id;
//    标题
    private String title;
//    报酬
    private Integer reward;
//    类别id

    private Long categoryId;
//    详细内容
    private String content;
//    地址
    private String location;
//    需求人数
    private Integer needNum;
//    当前协助人数
    private Integer assistNum;
//    权重
    private Short weight;
//    浏览量
    private Integer viewCount;
//    求助状态，0表示待接取，1表示已结束
    private Character status;
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
//    '删除标志，0表示未删除，1表示已删除'
    private Short delFlag;


    /**
     *
     * @author 刘鹏阳
     * @date 2023/5/22
     * @content :更新浏览量
     */
    public Help(Long id, Integer viewCount) {
        this.id = id;
        this.viewCount = viewCount;
    }
}
